<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        #box{
            width: 500px;
            height: 500px;
            background-color: skyblue;
            margin: 100px;
        }
    </style>
</head>
<body>
    <div id="box"></div>


    <script>
        window.addEventListener('load',function(){
            let box = document.getElementById('box');
            // box.onmouseenter
            box.addEventListener('mousemove',function(e){
                let x = e.pageX - box.offsetLeft;
                let y = e.pageY - box.offsetTop;
                box.innerText = (`(${x},${y})`)
            })

        })
    </script>
</body>
</html>